package com.kkb.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service("book")
public class Book {

    @Value("6")
    private Integer id;
    @Value("怪诞行为学")
    private String name;
    @Value("分析令人吃惊的消费心理")
    private String info;

    public Book() {
        System.out.println("Book的默认构造方法被调用：id="+id+",name="+name+",info="+info);
    }

    public Book(Integer id, String name, String info) {
        this.id = id;
        this.name = name;
        this.info = info;
        System.out.println("Book带参数的构造方法被调用：id="+id+",name="+name+",info="+info);
    }

    public Book(Integer id, String name) {
        this.id = id;
        this.name = name;
    }
}
